/**
 * Created by lvlq on 16/3/20.
 */
env = process.env.NODE_ENV || 'production';
Config = function () {
    return require(__dirname + "/../Farmework/Config/common.js")[env]
};

Util = function (str) {
    var arr = str.split(".");
    var path = "/../Farmework/Util/";
    for (var i = 0; i < arr.length; i++) {
        path += "/" + arr[i];
    }
    return require(__dirname + path);
};

M = function (str) {
    var arr = str.split(".");
    var path = __dirname + "/../Farmework/Model/";
    for (var i = 0; i < arr.length; i++) {
        path += "/" + arr[i];
    }
    return require(path);
};

var Result = M("index.result");

Result.findAll({
    raw: false
}).then(function (data) {
    for (var i = 0; i < data.length; i++) {
        data[i] = data[i].toJSON();
    }
    console.log(data);
});